using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Kirishima16.Applications.FTPPictureUploader
{
	public partial class ConfigForm<T> : Form
	{
		T targetObject;

		public T TargetObject
		{
			get { return targetObject; }
			protected set
			{
				targetObject = value;
				pgridMain.SelectedObject = value;
			}
		}

		public ConfigForm()
		{
			InitializeComponent();
		}

		public DialogResult ShowDialog(T tobj){
			this.TargetObject = tobj;
			return base.ShowDialog();
		}

		private void btnOkey_Click(object sender, EventArgs e)
		{
			Close();
		}

		private void btnCancel_Click(object sender, EventArgs e)
		{
			Close();
		}
	}
}